import { AppProps } from "next/app";
import "../styles/header.scss";
import "../styles/home.scss";
import "../styles/webrtc-pull.scss";
import "../styles/webrtc-push.scss";

import type { NextPage } from "next";

export type NextPageWithLayout = NextPage & {
  getLayout?: (page: React.ReactElement) => React.ReactNode;
};

type AppPropsWithLayout = AppProps & {
  Component: NextPageWithLayout;
};

export default function MyApp({ Component, pageProps }: AppPropsWithLayout) {
  const getLayout = Component.getLayout ?? ((page) => page);
  return getLayout(<Component {...pageProps} />);
}
